package org.mspring.crm.entity.permission;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * McrmUsersRoles entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user_role")
public class UserRole implements java.io.Serializable {
    private UserRolePK userRolePK;

    /**
     * 
     */
    public UserRole() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param userRolePK
     */
    public UserRole(UserRolePK userRolePK) {
        super();
        this.userRolePK = userRolePK;
    }

    @EmbeddedId
    @AttributeOverrides( { @AttributeOverride(name = "userId", column = @Column(name = "user_id", nullable = false)), @AttributeOverride(name = "roleId", column = @Column(name = "role_id", nullable = false)) })
    public UserRolePK getUserRolePK() {
        return userRolePK;
    }

    public void setUserRolePK(UserRolePK userRolePK) {
        this.userRolePK = userRolePK;
    }
}